/* ===== GLOBAL ===== */
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: #0f0f0f;
  color: #fff;
  overflow-x: hidden;
}

/* Canvas full screen */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* HEADER */
header {
  padding: 90px 20px;
  text-align: center;
}

header h1 {
  font-size: 3.2rem;
  font-weight: 800;
  margin: 0;
  letter-spacing: -1px;
  color: #1a0202; /* rouge cyberpunk */
  text-shadow: 0 0 10px #fc3939, 0 0 30px #ff4d4d;
}

/* CONTAINER */
.container {
  max-width: 1000px;
  margin: auto;
  padding: 40px 20px;
}

/* GLASS CARD */
.glass-card {
  background: rgba(255, 0, 0, 0.05);
  backdrop-filter: blur(14px);
  border-radius: 20px;
  padding: 40px;
  margin-bottom: 40px;
  border: 1px solid rgba(255, 0, 0, 0.2);
  box-shadow: 0 10px 40px rgba(255, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 15px 50px rgba(255, 0, 0, 0.4);
}

.glass-card h2 {
  color: #ff4d4d;
}

/* FEATURES */
.features {
  margin-top: 40px;
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.feature-box {
  background: rgba(255, 0, 0, 0.05);
  padding: 30px;
  border-radius: 18px;
  border: 1px solid rgba(255, 0, 0, 0.2);
  backdrop-filter: blur(12px);
  text-align: center;
  cursor: pointer;
  transition: 0.4s ease;
}

.feature-box:hover {
  transform: translateY(-8px) scale(1.05);
  background: rgba(255, 0, 0, 0.1);
}

.feature-box h3 {
  margin-bottom: 10px;
  font-size: 1.3rem;
  color: #ff4d4d;
}

/* FOOTER */
footer {
  text-align: center;
  padding: 25px;
  margin-top: 60px;
  color: #ff8080;
  font-size: 0.9rem;
}
/* ===== BOUTON RETOUR ===== */
.back-button {
  display: inline-block;
  padding: 12px 24px;
  margin: 20px 0;
  font-size: 1rem;
  font-weight: 600;
  color: #ff1a1a; /* texte rouge */
  background: rgba(255, 0, 0, 0.05);
  border: 2px solid rgba(255, 0, 0, 0.3);
  border-radius: 12px;
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: 0.3s ease;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.2);
}

.back-button:hover {
  background: rgba(255, 0, 0, 0.15);
  color: #ff4d4d;
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 6px 25px rgba(255, 0, 0, 0.4);
}

.back-button:active {
  transform: translateY(0) scale(0.98);
  box-shadow: 0 3px 12px rgba(255, 0, 0, 0.2);
}

/* ===== BOT INTERACTIF ===== */
#interactive-bot {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 80px;
  height: 80px;
  cursor: pointer;
  z-index: 1000;
  transition: transform 0.3s ease;
}

#interactive-bot:hover {
  transform: scale(1.1);
}

#bot-image {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 0, 0, 0.5);
  box-shadow: 0 4px 20px rgba(255, 0, 0, 0.3);
}

/* ===== BULLE DE CHAT ===== */
#chat-bubble {
  position: fixed;
  bottom: 120px;
  right: 20px;
  width: 350px;
  max-height: 500px;
  background: rgba(255, 0, 0, 0.05);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(255, 0, 0, 0.3);
  z-index: 1001;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  overflow: hidden;
}

#chat-bubble.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

#chat-bubble.hidden {
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  pointer-events: none;
}

#chat-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: none;
  border: none;
  color: #ff4d4d;
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 50%;
  transition: background 0.2s ease;
}

#chat-close:hover {
  background: rgba(255, 0, 0, 0.2);
}

#chat-messages {
  flex: 1;
  padding: 60px 20px 20px 20px;
  overflow-y: auto;
  max-height: 350px;
}

.bot-message, .user-message {
  margin-bottom: 15px;
  padding: 12px 16px;
  border-radius: 18px;
  max-width: 80%;
  word-wrap: break-word;
  font-size: 14px;
  line-height: 1.4;
}

.bot-message {
  background: rgba(255, 0, 0, 0.1);
  color: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.user-message {
  background: rgba(255, 0, 0, 0.2);
  color: #fff;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

#chat-input {
  width: calc(100% - 40px);
  padding: 12px 20px;
  margin: 10px 20px;
  border: 1px solid rgba(255, 0, 0, 0.3);
  border-radius: 25px;
  background: rgba(255, 0, 0, 0.05);
  color: #fff;
  font-size: 14px;
  outline: none;
}

#chat-input::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

#chat-send {
  position: absolute;
  bottom: 15px;
  right: 25px;
  background: linear-gradient(45deg, #ff3b3b, #ff6767);
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 20px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3);
}

#chat-send:hover {
  background: linear-gradient(45deg, #ff6767, #ff3b3b);
  transform: scale(1.05);
}

/* ===== NOTIFICATION POPUP ===== */
#notification-popup {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(255, 59, 59, 0.9);
  color: #fff;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 4px 15px rgba(255, 59, 59, 0.5);
  font-size: 14px;
  font-weight: 600;
  z-index: 1002;
  opacity: 0;
  transform: translateY(-20px);
  transition: all 0.3s ease;
  pointer-events: none;
}

#notification-popup.show {
  opacity: 1;
  transform: translateY(0);
}

.level-indicator {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 25px;
  line-height: 25px;
  text-align: center;
  font-weight: bold;
  font-size: 14px;
  color: white;
  user-select: none;
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
  z-index: 1000;
}

.level-beginner {
  background-color: #4caf50; /* vert */
}

.level-intermediate {
  background-color: #ff9800; /* orange */
}

.level-advanced {
  background-color: #f44336; /* rouge */
}

.hidden {
  display: none;
}
